<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>详情</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
		<!-- jQuery-->
		<script type="text/javascript" src="/static/plugins/jquery/jquery-3.6.0.min.js"></script>

		<!-- layui-->
		<link rel="stylesheet" href="/static/plugins/layui/2.8.4/css/layui.css" media="all">
		<script src="/static/plugins/layui/2.8.4/layui.js" charset="utf-8"></script>
		
		
	</head>
	<style>
		.all-view{
			width: 90%;
			margin: 0 auto;
			margin-top: 20px;
		}
		.btn-view{
			margin-bottom: 10px;
			
		}
		.add-btn{
			width:120px;
		}
		.bottom-view{
			position: fixed;
			bottom: 0;
			width: 100%;
		}
		.add-btn-view{
			width: 260px;
			margin: 0 auto;
			margin-bottom: 40px;
		}
	</style>
	
	<body>
		
		<!--头部输入框-->
		
		<form class="layui-form layui-form-pane all-view" action="" style="margin-bottom: 100px;">
			<div class="layui-form-item">
				<label class="layui-form-label">场景</label>
				<div class="layui-input-block">
					<input type="text" id="sceneName" class="layui-input" readonly>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">提问人</label>
				<div class="layui-input-block">
					<input type="text" id="userName" class="layui-input" readonly>
				</div>
			</div>
			<div class="layui-form-item layui-form-text" id="oldQuestionView" style="margin-bottom: 10px;">
				<label class="layui-form-label">用户问题</label>
				<div class="layui-input-block" style="width: 98%;margin: 0 auto;margin-top: 10px;">
					<span id="question" style="white-space: pre-line;font-size: 13px;color: #878787;"></span>
				</div>
			</div>
			<div class="layui-form-item layui-form-text" id="oldAnswerView" style="margin-bottom: 10px;">
				<label class="layui-form-label">回答</label>
				<div class="layui-input-block" style="width: 98%;margin: 0 auto;margin-top: 10px;">
					<span id="answer" style="white-space: pre-line;font-size: 13px;color: #878787;"></span>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">问答token数</label>
				<div class="layui-input-block">
					<input type="text" id="tokensCount" class="layui-input" readonly>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">是否知识库</label>
				<div class="layui-input-block">
					<input type="text" id="isKnowledgeTxt" class="layui-input" readonly>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">向量化token数</label>
				<div class="layui-input-block">
					<input type="text" id="knowledgeToken" class="layui-input" readonly>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">用户评价</label>
				<div class="layui-input-block">
					<input type="text" id="evaluateTxt" class="layui-input" readonly>
				</div>
			</div>
			<div class="layui-form-item layui-form-text" id="oldWholeSendMsgView" style="margin-bottom: 10px;">
				<label class="layui-form-label">完整信息</label>
				<div class="layui-input-block" style="width: 98%;margin: 0 auto;margin-top: 10px;">
					<span id="wholeSendMsg" style="white-space: pre-line;font-size: 13px;color: #878787;"></span>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">所用AI模型</label>
				<div class="layui-input-block">
					<input type="text" id="aiModelName" class="layui-input" readonly>
				</div>
			</div>


      </form>



		<input type="hidden" name="id" id="id" value=""><!--信息id-->

      <script>
		  $('#id').val('[(${dto.id})]');


		  $.ajax({
			  url : '/api/inter/eKnowChatLog/eKnowChatLogDetailById',
			  data : {id:$('#id').val()},
			  type : 'POST',
			  async : false,
			  success : function(result) {
				  if(result.code=='SUCCESS'){

					  var eKnowChatLog = result.eKnowChatLog;
					  if(eKnowChatLog!=undefined && eKnowChatLog!=null){
						  $('#oldLogView').show();
						  $('#oldLogViewNo').hide();
						  $('#question').text(eKnowChatLog.question);
						  $('#answer').text(eKnowChatLog.answer);
						  $('#sceneName').val(eKnowChatLog.sceneName);

						  $('#userName').val(eKnowChatLog.userName);
						  $('#tokensCount').val(eKnowChatLog.tokensCount);
						  $('#isKnowledgeTxt').val(eKnowChatLog.isKnowledgeTxt);
						  $('#knowledgeToken').val(eKnowChatLog.knowledgeToken);
						  $('#evaluateTxt').val(eKnowChatLog.evaluateTxt);
						  $('#aiModelName').val(eKnowChatLog.aiModelName);

						  if(eKnowChatLog.wholeSendMsg!=null && eKnowChatLog.wholeSendMsg!=''){
							  $('#wholeSendMsg').text(eKnowChatLog.wholeSendMsg);
							  $('#oldWholeSendMsgView').show();
						  }else {
							  $('#oldWholeSendMsgView').hide();
						  }

					  }
				  }else{
					  layer.msg('不好意思，系统出现问题了，请稍后重试！', {icon: 2});
					  setTimeout(function(){
						  window.parent.layer.closeAll();
					  }, 1000);
				  }
			  }
		  });


      </script>

  </body>
</html>